Skip to content

Conversation

@elenafuengar
Copy link
Collaborator

@elenafuengar elenafuengar commented Nov 14, 2025

📝 Pull Request Summary

To close #32, added new functions that allow to save and load the generated grid with the imported solids STL masks to and from an HDF5 file, saving valuable time in parametric studies.

🔧 Changes Made

  • Add save_to_h5 and load_from_h5 routines to GridFIT3D to enable grid saving to HDF5 and grid reconstruction from HDF5.
  • Refactored GridFIT3D constructor __init__ to allow 3 grid initialization methods: from domain bounds and number of cells (legacy) from x, y, z numpy arrays or from HDF5 previously saved file.
  • Style enhancements using RUFFs linter in examples, and core filesGridFIT3D, SolverFIT3D, routines.py, WakeSolver
  • Improvements in WakeSolver load results, now updating folder name in self or taking self.folder if passed to constructor. Ez_file is now set to None in constructor, and default is self.folder+'Ez.h5'.
  • Added load and save grid tests to 001
  • Added load and save grid to notebooks 002 and 006
  • Added domain bounds to Logger and updated test 007 to compare the dicts using np.isclose instead of ==, working now also for MPI runs.
  • minor build changes to pyproject.toml needed for the new functions to work
  • Introduced new PR workflow to run MPI tests automatically on PR update.

✅ Checklist

  • Code follows the project's style and guidelines
  • Added tests for new functionality --> added in test 001 (both save and load)
  • Updated documentation (mentioned in docs/ or included in examples/ and notebooks/) --> added to notebook 002 and 006.
  • Verified that changes do not break existing functionality (automatic tests passing): both CPU and MPI

📌 Related Issues / PRs

Closes #32

@elenafuengar elenafuengar changed the title Feature/grid save load Allow saving and loading the 3D grid to and from an HDF5 file Nov 14, 2025
…eption''

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
@elenafuengar elenafuengar marked this pull request as draft November 14, 2025 17:26
@elenafuengar elenafuengar marked this pull request as ready for review November 14, 2025 18:52
@elenafuengar elenafuengar merged commit fad37a5 into main Nov 18, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow saving (and loading) the generated grid in HDF5 format

2 participants